Skip to content

refactor(replay): own execution and source data ports in contracts - #4534

Merged
thymikee merged 1 commit into
t3/maestro-plugin-extractionfrom
t3/replay-data-contracts
Nov 16, 2026
Merged

thymikee merged 1 commit into
t3/maestro-plugin-extractionfrom
t3/replay-data-contracts

Conversation

@thymikee

@thymikee thymikee commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

Move replay data contracts and their consumers together for #3871. This layer preserves the existing replay behavior.

Head 46e5841764d3f2e500448bd303e0df9c4a4a700d. Actual layer: 60 files / 762 gross lines. Default-main comparison: 331 files / 8,143 gross, including inherited integration changes.

Validation

Independent Codex source review approves the bounded floor repair and preservation interactions; all eight upper range-diff entries match.

Node 22.13 PREP and clean TOP build/package probes pass, with normal plugin prepack, retained core tarballs, all 15 installed entry points and CLI execution. TOP has eight passing package cases. CI now also runs build/package gates on Node 22.13.0; the Node 22.12 consumer probe remains.

The seven predecessor Node26 canonical passes remain attributed to their original heads. The owner accepted that evidence while retaining historical ENV/ref qualifications. Current hosted checks are clear: 17 successful, two skipped and one neutral across the latest 20 named checks. CI, coverage, integration, Android/Linux/iOS/macOS smoke and selected decision-kernel mutants succeeded. The full mutant matrix was skipped. Earlier cancelled runs remain historical. New-head local canonical receipts are separate; no old result is transferred.

Both plugins remain private pending maintainer placeholders, trusted publishers and usable publication. Native ADR acceptance, live/current-client, performance and security obligations remain open. No merge clearance.

@github-actions

github-actions Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Size Report

Metric Base Current Diff
Installed (including dependencies) 6.09 MB 6.09 MB +30 B
Package (unpacked) 6.09 MB 6.09 MB +30 B
Package (download) 1.85 MB 1.85 MB -7 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 25.3 ms 27.5 ms +2.2 ms
CLI --help 50.0 ms 56.2 ms +6.2 ms

@thymikee
thymikee added this pull request to stack #4529 November 13, 2026 23:26
@thymikee thymikee changed the title refactor(replay): separate divergence data from executable engines refactor(replay): own execution and source data ports in contracts Nov 14, 2026
@thymikee
thymikee force-pushed the t3/replay-data-contracts branch from 1ae41e5 to 164b557 Compare November 14, 2026 01:51
@thymikee

Copy link
Copy Markdown
Member Author

This PR is ready at 164b557: I found no problems in the code. CI is green at this head, and the cancelled jobs in the earlier runs were superseded by the passing runs. I did not run tests locally, did not re-measure the startup-median latency left open, and did not read all 60 changed files line by line. Instead I relied on the patches matching the earlier reviewed commit plus spot checks of the contracts exports. Not blocking: the header comments in packages/contracts/src/ad-replay-execution.ts still carry history, and the ../index.ts reference no longer resolves in contracts, so you can trim them to the current ownership statement in a follow-up or leave them. The PR is a draft stacked on t3/maestro-plugin-extraction, so it merges after its base.

@thymikee
thymikee force-pushed the t3/replay-data-contracts branch from 164b557 to 1078ec0 Compare November 14, 2026 05:57
@thymikee

Copy link
Copy Markdown
Member Author

The preparation layer remains unchanged at 1078ec04f8baab6301072d20bec94ae0ceb00c55. Its affected admission passed at that exact head (42 passed / 25 skipped, exactCommit=true, checkoutChanged=false) and all 19 hosted checks passed. The retained range-diff shows the preparation patches unchanged through the public-type restack.

I have left the optional comment/constant-placement cleanup out of this round: there is no triggering source defect, and changing this already independently reviewed lower layer would rebase all consumers. The actual contracts-first boundary, moved declarations' runtime consumers, and unused-export/changed-line guard failures were addressed in the published layers; historical failed receipts remain historical failures. This is code/admission evidence only. C3 integration, native ADR acceptance, live/platform requirements and private-package npm setup still block stack integration.

@thymikee
thymikee marked this pull request as ready for review November 14, 2026 08:08

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 60 files

Reply with feedback, questions, or to request a fix.

View guided diff | Turn on auto-fix | Re-trigger cubic

@blacksmith-sh

This comment has been minimized.

@apex-sentinel-staging

apex-sentinel-staging Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (189570486a11).

💬 Talking to Sentinel

In a finding's thread, reply with:

Command What it does
@apex-sentinel-staging note <context> Adds context; Sentinel re-checks the cited code
@apex-sentinel-staging pivot <why> Says the finding is wrong; Sentinel re-checks the cited code
@apex-sentinel-staging like Marks the finding as useful
@apex-sentinel-staging dislike <why> Marks it as not useful, so it is not raised again

On this conversation, comment @apex-sentinel-staging review to run a full review once again.

Earlier reviews

Review of 6d011ba8 · 15.11.2026 01:24 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

3 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (d78be6c88715).

Review of d3739f84 · 14.11.2026 20:50 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

1 finding below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (d78be6c88715).

Review of 8a215d81 · 14.11.2026 10:12 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

The changes are the same as on f4a715a, so this is that review, not a new one. Comment @apex-sentinel-staging review to review again.

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (d38e35e61193).

Review of f4a715a1 · 14.11.2026 09:57 UTC

Apex Sentinel · ✅ Approve

Since the last review: 0 new · 0 still open · 0 no longer raised

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

Reviewed with this repository's own Sentinel configuration (d38e35e61193).

Review of 1078ec04 · 14.11.2026 08:16 UTC

Apex Sentinel · ✅ Approve

No open findings.

Not in the reviewers' prompt (1 file)
  • pnpm-lock.yaml: generated or a lockfile, so its lines were left out

2 findings below minor hidden (user_settings.min_severity).

Reviewed with this repository's own Sentinel configuration (d38e35e61193).

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 14, 2026
@thymikee

Copy link
Copy Markdown
Member Author

The iOS log at 1078ec04 identifies the Blacksmith failure: smoke:deep-link-navigation calls the stored-URL Maestro YAML and receives INVALID_ARGS with details.reason: plugin-not-installed for @agent-device/maestro. The selected Apple aggregate correctly fails with iOS.

A local correction now installs the built Maestro plugin after the shared Apple build, using a job-scoped plugin home inherited by subsequent smoke steps. It belongs in the lower Maestro layer, so it reaches this PR too. Frozen install/build/format and a device-free real installer/source-export check pass; publication is queued in the active stack refresh. Fresh hosted iOS success is still required.

@thymikee

Copy link
Copy Markdown
Member Author

I found no code problems at 8a215d8. Both earlier minor notes are fixed there: AdReplayTargetStructuralDenotation is now Readonly<NodeStructuralDenotation>, and the step-loop.ts comments point to @agent-device/contracts/ad-replay-execution. This follows the earlier review of 1078ec0 (#4534 (comment)).

The two minor threads, #4534 (comment) and #4534 (comment), no longer apply at this head, so you can resolve them.

The checks do not confirm green yet. All 12 jobs that did not pass were cancelled, not failed, which points to superseded runs. A complete CI run on 8a215d8 must finish green before merge. I did not compile or run tests. I judged the type change from the type shapes, and CI owns that check.

@thymikee
thymikee force-pushed the t3/replay-data-contracts branch from 8a215d8 to d3739f8 Compare November 14, 2026 20:34
@thymikee
thymikee removed this pull request from stack #4529 November 14, 2026 20:35
@thymikee
thymikee added this pull request to stack #4556 November 14, 2026 20:35
@thymikee

Copy link
Copy Markdown
Member Author

I found no code problems at d3739f8. The layer patch is identical to the one I reviewed at 8a215d8, and both open review threads are now fixed at this head: Readonly<NodeStructuralDenotation> is the only definition in ad-replay-execution.ts, and step-loop.ts now imports from @agent-device/contracts/ad-replay-execution.

Please resolve those two threads, since neither applies any more: #4534 (comment) (type is no longer duplicated) and #4534 (comment) (the remaining runtime-port-types.ts mention at line 30 refers to the maestro precedent, which still exists).

I did not run build, typecheck, tests or the layering gate locally. This review rests on the identical patch and on your passing affected run.

CI at this head gives no usable signal yet. Lint/Typecheck/Package, Integration, Coverage, Repo Guards, Bundle Size and the mutants jobs were cancelled by concurrency. Android Smoke fails at smoke:maestro-clickable-first (assertVisible 'Maestro selection: clickable'). The same scenario fails the same way on the stack base dda310e, so this failure comes from the base and needs a fix there. Apple iOS smoke failed 01-settings.ad on all three attempts, after the click opened Settings > Apple Intelligence & Siri. The diff only moves types and imports, and the same lane passed on dda310e and on the branches stacked above this one, so I suspect simulator Settings state. I have not proven that.

Before merge, please get fresh CI at d3739f8, including a rerun of the Apple iOS smoke job and the cancelled jobs, and fix the Android failure in the stack base.

@thymikee
thymikee force-pushed the t3/replay-data-contracts branch from d3739f8 to 6d011ba Compare November 15, 2026 01:14
Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
@thymikee
thymikee force-pushed the t3/replay-data-contracts branch from 6d011ba to 46e5841 Compare November 16, 2026 07:48
@thymikee

Copy link
Copy Markdown
Member Author

I found no code problems at 46e5841. The two earlier inline notes are fixed at this head: the duplicate denotation type is gone (contracts reuses NodeStructuralDenotation), and packages/ad-replay/src/internal/step-loop.ts now names @agent-device/contracts/ad-replay-execution.

The earlier review of 6d011ba found no problems, and the changes since then did not change that.

CI is green on this head. The 16 non-passing jobs in the first packet came from one cancelled run, and a re-check shows every job passing or skipped as a matrix placeholder.

Could formatReplayDivergenceReport and its text-guidance helpers in replay-divergence-data.ts live in packages/command-output, while contracts keeps the shared resume reader, bounds, and redaction functions? Its only production consumers are command-output/src/output/error.ts and src/cli/replay-test/reporters/default.ts, and it renders CLI commands and human guidance. The code-ownership document assigns output formatters to command-output, so this split would keep presentation policy out of the shared contracts package.

The two threads above can be resolved: the duplicate denotation type no longer exists, and the stale import and doc in step-loop.ts now point at the contracts module (the remaining runtime-port-types.ts mention refers to the Maestro file used as precedent).

There are no conflicts. The question above is the only open item from review. Merge waits on the stack base t3/maestro-plugin-extraction and the maintainer steps listed in the PR body.

@thymikee thymikee removed the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Nov 16, 2026
@thymikee
thymikee merged commit 9a7fe00 into 0.22 Nov 16, 2026
22 of 38 checks passed
@thymikee
thymikee deleted the t3/replay-data-contracts branch November 16, 2026 09:40
thymikee added a commit that referenced this pull request Nov 16, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 19, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 20, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 20, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 21, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 21, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 23, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
hannojg pushed a commit to hannojg/agent-device that referenced this pull request Nov 23, 2026
…allstack#4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
thymikee added a commit that referenced this pull request Nov 24, 2026
…4534)

Move execution-neutral replay data and shared ports with matching package exports, dependency declarations and contract pins. Preserve the previously reviewed layer content.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant